#pragma once

#include "FrameWindowWnd.h"

typedef enum
{
	BUTTON_DEFAULT = 0,
	BUTTON_MOUSELEAVE,
	BUTTON_MOUSEHOVER,
	BUTTON_KEYDOWN,
	BUTTON_KEYUP
} BUTTONSTATE_UI;

class CSystemButton:public CFrameWindowWnd
{
public:
	CSystemButton(void);
	virtual ~CSystemButton(void);
	virtual void DoPaint(HDC hDC, const RECT& rcPaint);
	//HWND Create(HWND hwndParent,LPCTSTR pstrName,DWORD dwStyle,DWORD dwExStyle,const RECT rc)
	void CreateButton(LPCTSTR strResource,HWND hWndParent,HINSTANCE hInst,const RECT rc);
	virtual LRESULT CALLBACK WndProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam);
	void OnMouseHover();
	void OnMouseLeave();
	virtual void OnMouseUp();
	void Invalidate();
public:
	HWND m_hWndParent;
private:
	HBITMAP m_imgButton;
	BITMAP  m_imgInfo;
	RECT   m_rcItem;
	bool m_bMouseTracking;
	UINT m_bButtonState;
	//HWND m_hWndButton;
	
};
